package com.springcloud.api.common;

public enum CommonResultCode implements IErrorCode{
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    REDIRECTED(301, "资源被重定向"),
    VALIDATE_FAILED(404, "请求的资源（网页等）不存在"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    PARAM_INVALID(1001,"参数无效"),
    PARAM_BLANK(2001,"参数为空"),
    PARAM_TYPE_ERROR(2002,"参数类型错误"),
    USER_LOGIN_ERROR(2003,"账号不存在或密码错误"),
    USER_NOT_EXIST(2004,"用户不存在"),
    USER_EXISTED(2005,"用户已存在");

    Integer code;
    String msg;

    CommonResultCode(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
